<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Caziac: Caziac::Http::AHandleResponse Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.2-20100208 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><b>Caziac</b>::<b>Http</b>::<a class="el" href="class_caziac_1_1_http_1_1_a_handle_response.html">AHandleResponse</a>
  </div>
</div>
<div class="contents">
<h1>Caziac::Http::AHandleResponse Class Reference</h1><!-- doxytag: class="Caziac::Http::AHandleResponse" -->
<p>Handle for an HtttpResponse.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_a_handle_response_8hh_source.html">AHandleResponse.hh</a>&gt;</code></p>

<p><a href="class_caziac_1_1_http_1_1_a_handle_response-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_response.html#abb512fed3ee2a3f6e616d9560822444b">AHandleResponse</a> (<a class="el" href="class_caziac_1_1_tools_1_1_i_writer.html">Tools::IWriter</a> *writer)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">constructor of the <a class="el" href="class_caziac_1_1_http_1_1_handle_response.html" title="Handle for an HtttpResponse.">HandleResponse</a>  <a href="#abb512fed3ee2a3f6e616d9560822444b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeb45bca84c6ee7b3778064c9a813df72"></a><!-- doxytag: member="Caziac::Http::AHandleResponse::~AHandleResponse" ref="aeb45bca84c6ee7b3778064c9a813df72" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_response.html#aeb45bca84c6ee7b3778064c9a813df72">~AHandleResponse</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">destructor of the <a class="el" href="class_caziac_1_1_http_1_1_handle_response.html" title="Handle for an HtttpResponse.">HandleResponse</a> <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::multimap&lt; std::string, <br class="typebreak"/>
std::string &gt; const &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_response.html#a825e837939fc7f2551fca7723d1e9ea3">getHeader</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">this function get the header of the Response  <a href="#a825e837939fc7f2551fca7723d1e9ea3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_caziac_1_1_http_1_1_line_response.html">LineResponse</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_response.html#abec29b5fc318e4767cdf37676c070c43">getLineResponse</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">this function get the <a class="el" href="struct_caziac_1_1_http_1_1_line_response.html" title="class for the first line of an HttpResponse">LineResponse</a> (method url version)  <a href="#abec29b5fc318e4767cdf37676c070c43"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_response.html#a285539dd02b020491752fa828148076c">pack</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">write The <a class="el" href="struct_caziac_1_1_http_1_1_line_request.html" title="class for the first line of an HttpRequest">LineRequest</a>, the Header content and an empty line  <a href="#a285539dd02b020491752fa828148076c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_response.html#aa418134fb4b7ba580e1b7f6d94342f80">sendBody</a> (std::string const &amp;bodyline)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">send a body line or an entire body  <a href="#aa418134fb4b7ba580e1b7f6d94342f80"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a699dbb075c8b7a31f0ce2a87c8d0686f"></a><!-- doxytag: member="Caziac::Http::AHandleResponse::addDescription" ref="a699dbb075c8b7a31f0ce2a87c8d0686f" args="(std::string const &amp;key, std::string const &amp;def)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_response.html#a699dbb075c8b7a31f0ce2a87c8d0686f">addDescription</a> (std::string const &amp;key, std::string const &amp;def)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">add a description to the Header <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_response.html#ad98942771b7d8ae11889857ab805d734">operator==</a> (bool const)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">[User Implementation]  <a href="#ad98942771b7d8ae11889857ab805d734"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Handle for an HtttpResponse. </p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="abb512fed3ee2a3f6e616d9560822444b"></a><!-- doxytag: member="Caziac::Http::AHandleResponse::AHandleResponse" ref="abb512fed3ee2a3f6e616d9560822444b" args="(Tools::IWriter *writer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Caziac::Http::AHandleResponse::AHandleResponse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_caziac_1_1_tools_1_1_i_writer.html">Tools::IWriter</a> *&nbsp;</td>
          <td class="paramname"> <em>writer</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>constructor of the <a class="el" href="class_caziac_1_1_http_1_1_handle_response.html" title="Handle for an HtttpResponse.">HandleResponse</a> </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>writer</em>&nbsp;</td><td>the Socket writer This will set attribue "_writer" for later using </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a825e837939fc7f2551fca7723d1e9ea3"></a><!-- doxytag: member="Caziac::Http::AHandleResponse::getHeader" ref="a825e837939fc7f2551fca7723d1e9ea3" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::multimap&lt;std::string, std::string&gt; const&amp; Caziac::Http::AHandleResponse::getHeader </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>this function get the header of the Response </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the header</dd></dl>
<p>This function return the header parsed by the user with the consumeHeaderLine method. This member function is for consulting. </p>

</div>
</div>
<a class="anchor" id="abec29b5fc318e4767cdf37676c070c43"></a><!-- doxytag: member="Caziac::Http::AHandleResponse::getLineResponse" ref="abec29b5fc318e4767cdf37676c070c43" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_caziac_1_1_http_1_1_line_response.html">LineResponse</a>&amp; Caziac::Http::AHandleResponse::getLineResponse </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>this function get the <a class="el" href="struct_caziac_1_1_http_1_1_line_response.html" title="class for the first line of an HttpResponse">LineResponse</a> (method url version) </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the line response </dd></dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>call readResponseHeader before to set the <a class="el" href="struct_caziac_1_1_http_1_1_line_response.html" title="class for the first line of an HttpResponse">LineResponse</a> attributes </dd></dl>

</div>
</div>
<a class="anchor" id="ad98942771b7d8ae11889857ab805d734"></a><!-- doxytag: member="Caziac::Http::AHandleResponse::operator==" ref="ad98942771b7d8ae11889857ab805d734" args="(bool const)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Caziac::Http::AHandleResponse::operator== </td>
          <td>(</td>
          <td class="paramtype">bool const&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>[User Implementation] </p>
<p>This function should return true if the <a class="el" href="struct_caziac_1_1_http_1_1_line_response.html" title="class for the first line of an HttpResponse">LineResponse</a> status is OK but a USER can redefine this function for some specifications. </p>

</div>
</div>
<a class="anchor" id="a285539dd02b020491752fa828148076c"></a><!-- doxytag: member="Caziac::Http::AHandleResponse::pack" ref="a285539dd02b020491752fa828148076c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Caziac::Http::AHandleResponse::pack </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>write The <a class="el" href="struct_caziac_1_1_http_1_1_line_request.html" title="class for the first line of an HttpRequest">LineRequest</a>, the Header content and an empty line </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>this function must be call at the end of Header parsing </dd></dl>

</div>
</div>
<a class="anchor" id="aa418134fb4b7ba580e1b7f6d94342f80"></a><!-- doxytag: member="Caziac::Http::AHandleResponse::sendBody" ref="aa418134fb4b7ba580e1b7f6d94342f80" args="(std::string const &amp;bodyline)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Caziac::Http::AHandleResponse::sendBody </td>
          <td>(</td>
          <td class="paramtype">std::string const &amp;&nbsp;</td>
          <td class="paramname"> <em>bodyline</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>send a body line or an entire body </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>if the Header wasn't send it will send automatically the header before </dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the entire line was send</dd></dl>
<p>This function check the "Content-length" value of the Header, this will return false if the the length is too big. For example if you have:</p>
<p>In the header "Content-length : 20" </p>
<div class="fragment"><pre class="fragment">        sendLine(<span class="stringliteral">&quot;Star wars \r\n&quot;</span>);     <span class="comment">// First call return true (size = 12)</span>
        sendLine(<span class="stringliteral">&quot;Star wars \r\n&quot;</span>);     <span class="comment">// Second call return false (size = 12)</span>
</pre></div><p>This will send only the first call </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_a_handle_response_8hh_source.html">AHandleResponse.hh</a></li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Generated on 12 Sep 2011 for Caziac by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address>
</body>
</html>
